package or;

public class T1827 {
    public int minOperations(int[] nums) {

        int sum=0;
        for (int i = 1; i <nums.length ; i++) {
            if (nums[i]<=nums[i-1]){
                sum+=nums[i-1]+1-nums[i];
                nums[i]=nums[i-1]+1;
            }
        }
        return sum;
    }
}
